
#ifndef _MEMBER_BYAMLDOCUMENT_H_
#define _MEMBER_BYAMLDOCUMENT_H_

#include <BYamlDocument>
#include "member_BYamlNode.h"

#define sondoc_member(sondoc)	((member_BYamlDocument*)((BYamlDocument*)sondoc)->_ptr)

namespace BWE
{
	class member_BYamlDocument
	{
	public:
		member_BYamlDocument(BYamlDocument* sondocument);
		~member_BYamlDocument();

		int readLevel(const BString& text);
		void arrangeIndent(BYamlNode* node);

		void writeNode(const BYamlNode* node, BString& yamlText, int indent);
		void writeNode(const BYamlNode* node, BStream& stream, int indent);

		BYamlDocument*			boss;
		BYamlNodeHolder			node;
		BYamlNodeHolderArray	topNodes;
		int						levelIndent;
		BString					log;
	};
}

#endif
